1. Field of the Invention
The present invention relates generally to data structures and methods for improving data transfer in object oriented distributed applications. More specifically, the invention relates to data structures and methods for defining and using attribute data blocks to instantiate objects and to communicate objects or object information among different machines running a distributed application. The distributed application may be run over the Internet or an intranet.
2. Description of the Related Art
Object oriented programming is a useful programming technique that results in code that may be conveniently debugged and maintained. One object oriented technique referred to as encapsulation includes or encapsulates data inside of an object that also contains methods and events. In an application such as a distributed application where data is processed in more than one location and frequently transferred between locations, encapsulation can result in excessive demands on the data channel between machines running the application.
One way of transferring data between machines, usually from a server to a client, is hypertext markup language (HTML). When HTML is used, each time the user of a client machine selects hypertext on, for example, a web page, the server supporting that page transmits or "pushes" an entirely new page over the communication link between the machines, e.g., the internet, even where the new page differs from the previous page in only some small, incremental aspect. With the size of these pages being relatively large and the amount of traffic on the World Wide Web ever increasing, it would be desirable if the transmission bandwidth required by this technology could be reduced.
The Java virtual machine (JVM) and the Java programming language represent a significant improvement in the efficiency with which such interactive content may be transmitted between client and server platforms. Initially, when a client requests that a particular Java object subclass on the server platform be instantiated on the client platform, the server sends the subclass definition and the actual application or applet program associated with that subclass including any methods and data required to execute the object. Java's advantage over HTML is realized for each subsequent request from the client for that subclass. This is because the JVM determines the information delta, that is, the information which has changed for that object instance since the last request, and transmits only the delta for the subsequent request. This information delta is typically much smaller than the original amount of information transmitted with the object although there may significant overhead associated with identifying individual data fields within the delta transmission.
Although the delta method implemented in Java as described above is relatively efficient for simple data transmission, the amount of bandwidth required to perform relatively simple operations associated with a distributed applications is large. For example, a class of object called a button class may be described for an application. Each instance of the button class includes methods, events and data. Each time a new button is created by the server or the client, if the client is given that privilege, a new instance of the class button is created. In order to transfer the data associated with the new button from one machine to another, the data is encapsulated in an object that includes, among other things, all of the methods and events that are included in button objects.
The number of methods can become very large since, in general, for each attribute of the object, there is a set method and a get method used to store and retrieve attribute data from memory. The JVM compiles the different methods to handle storing and retrieving data. When an attribute of an object is changed, for example, by a client, the attribute is encapsulated in an object and the amount of information that is sent from the client must include set and get methods for each attribute. Each set and get method is compiled and used to pass data to and from memory for its corresponding attribute. Thus, while representing a considerable conservation of bandwidth resources with respect to HTML, Java as currently used still requires a relatively large amount of bandwidth for sending data.
What is needed is an alternative to the object oriented model for instantiating objects and passing objects and attribute data that is encapsulated within objects between machines that are running a distributed application. It would be useful if a way could be found of retaining the benefits of object oriented programming in the conceptualization of a program, while detaching data from an encapsulating object in an implementation so that the process of instantiating an object could be simplified and the bandwidth requirements of a channel transferring data between machines running a distributed application could be reduced.